package br.com.locanet.bean.impl;

import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import br.com.locanet.bean.IEntity;


@Entity
@Table(name="estilos_filmes")
@NamedQueries({
	@NamedQuery(name="EstiloFilme.findAll",query="select ef from EstiloFilme ef")
})
public class EstiloFilme implements IEntity {
	@Id
	@GeneratedValue
	@Column(name="seq_estilo")
	private Long id;
	
	@Column(name="nome_estilo")
	private String nome;
	
	@Column(name="status_estilo")
	private Integer status;
	
	@OneToMany(mappedBy="estilo",cascade=CascadeType.ALL,fetch=FetchType.LAZY)
	private List<Filme> filmes;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public List<Filme> getFilmes() {
		return filmes;
	}
	public void setFilmes(List<Filme> filmes) {
		this.filmes = filmes;
	}
}
